package com.famnote.randomchat;

import java.util.ArrayList;
import java.util.HashMap;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.AdapterView.OnItemClickListener;

public class OccupantListActivity extends Activity {

	// Debugging
    private static final String TAG = "MainActivity";
    private static final boolean D = true;
 
    
    private Activity activity;
    
    ListView list;
    LazyAdapter adapter;
    
    ArrayList<HashMap<String, String>> profiles = null;
    
    
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_occupant_list);
		
		activity = this;
		
		list=(ListView)findViewById(R.id.list);
		 
        // Getting adapter by passing xml data ArrayList
        //adapter=new LazyAdapter(this, songsList);
        //list.setAdapter(adapter);
 
        // Click event for single list row
        list.setOnItemClickListener(new OnItemClickListener() {
 
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
 
            	//String profileid = profiles.get(position).get("id");
            	

            	/*
                	Intent i = new Intent(activity, GroupChat.class);
                	
                	i.putExtra("roomid", profileid);
                	
                	String title = profiles.get(position).get("title");
                	i.putExtra("title", title);
                	String subtitle = profiles.get(position).get("subtitle");
                	i.putExtra("subtitle", subtitle);
                	
                	startActivity(i);
            	*/	
            	
            	
            }
            
        });
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_occupant_list, menu);
		return true;
	}

}
